
const fs = require('fs');
const moment = require('moment');
const assert = require('assert');
const {logger} = require('../src/log4j');
describe('#indexOf()', function () {
    it('should return -1 when the value is not present', function () {
        assert.equal([1, 5, 10, 15].findIndex(function (value, index, arr) {
            return value > 9;
        }), 2);
    });
    it('测试异步', (done) => {

        fs.readFile('./package.json', err => {
            if (err) {
                throw err;
            }
            done();
        });
    });

    it('测试moment',()=>{
        const result = moment('Wed Jul 12 2017 11:49:24 GMT+0800','');
        logger.debug(result);
        assert.equal(1,12);
    });

});
